%h2{:class=>"content_header"} 
  =t(:video_submited_title)
.user_info_zone
  =t(:video_submited, :points=>@current_user.active_campaign.points_submit_content)
  
%h1
  =t(:campaign_how_to_win_more_title)

%p
  .action_required
    =link_to t(:campaign_invite_now_friends_to_act_on_content), publishs_stream_to_vote_comment_url(@current_user)
%p
  =image_tag("icon_like.gif")
  =t(:campaign_invite_friends_to_vote_content_win_points,:points=>@current_user.active_campaign.points_content_voted)
%p
  =image_tag("icon_comment.gif")
  =t(:campaign_invite_friends_to_comment_content_win_points,:points=>@current_user.active_campaign.points_content_commented)


%h2
  =t(:campaign_how_to_win_actions_from_you_title)
%p
  .action_required
    =link_to t(:campaign_invite_now_friends), new_invitation_url
%p
  =image_tag("icon_friends.gif")
  =t(:campaign_invite_friends_win_points,:points=>@current_user.active_campaign.points_invite_friends)
%p
  .action_required
    =link_to t(:campaign_add_new_video_now), new_user_video_url(@current_user)
%p
  =image_tag("icon_add.gif")
  =t(:campaign_submit_content_win_points,:points=>@current_user.active_campaign.points_submit_content)
%p
  .action_required
    =link_to t(:campaign_see_all_videos_now), videos_url
%p
  =image_tag("icon_comment.gif")
  =t(:campaign_comment_content_win_points,:points=>@current_user.active_campaign.points_comment_content)
%p
  =image_tag("icon_like.gif")
  =t(:campaign_vote_content_win_points,:points=>@current_user.active_campaign.points_vote_content)



%script{:type => "text/javascript", :charset => "utf-8"}    
  Facebook.showPermissionDialog("publish_stream", function() {publishVideo()}); 

  var user_message = "#{campaign_publish_stream_user_message}"
  
  var video_img_src = "http://i3.ytimg.com/vi/#{@video.video_id}/default.jpg";
  var video_src = "http://www.youtube.com/v/#{@video.video_id}";
  
  
  var name = "#{@video.title}";
  var href = "#{video_url(@video)}";
  
  var caption = "#{campaign_publish_stream_caption}";
  
  var description = "#{@video.description}";
  var join_now_href = "#{root_url}";
  var join_now_text = "#{campaign_publish_wall_join_now_link_text}";
  
  var action_links = [{'text':join_now_text, 'href':join_now_href}];
  
  
  var target_id = null;
  var user_message_prompt = "#{campaign_publish_wall_user_message_prompt}";
  var callback = null;
  
  var auto_publish = #{campaign_publish_wall_auto_publish};
  
  var actor_id = null;
  
  :plain
    
    
    function publishVideo() {
      var attachment = {'name': name,'href': href,'caption': caption,'description': description,
      'media': [{'type': 'flash','swfsrc':video_src,'imgsrc':video_img_src, 'width':'100', 'height':'80','expanded_width':'461','expanded_height':'258'}]}; 
      Facebook.streamPublish(user_message, attachment, action_links, target_id, user_message_prompt,callback, auto_publish, actor_id);
    }
